#!/usr/bin/env ipython

import os
import sys

sys.path.append('../../lib')
sys.path.append(os.getenv("HOME")+'/lib')

from flgrcore import *
from flgrmorpho import *

imin = flgr2d_load_pgm('../../apps/images/gray/lena.pgm','input')
imin2 = FLGR_Data2D(imin.size_x,imin.size_y,'fgUINT8','eroded')
nhb = FLGR_Data2D(3,3,'fgUINT8','sq9x9','RECT','8-connexity')

flgr2d_gradient_inner(imin2,imin,nhb)

flgr2d_save_pgm(imin2)

